package work;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ConfigWork {
    @Bean
    public Worker worker(){
        Worker worker = new Worker();
        worker.setName("猪八戒");
        worker.setAge(300);
        return worker;
    }
}
